/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package shoppershause.db;

import java.lang.*;
import java.sql.*;

public class DBConnection
{

    public static Connection getConnection()
    {
    Connection conn=null;
    //PreparedStatement psmt=null;
    String url="jdbc:mysql://localhost:3306/testdb";
    String driver="com.mysql.jdbc.Driver";
    

    try
    {
           Class.forName(driver);
    conn=DriverManager.getConnection(url,"root","");
    if(conn!=null)
    {
        System.out.println("Database Connected:::::::::");
    }


    }catch(Exception e)
    {
        System.out.println("Database not Connected:::::::::");
        e.printStackTrace();
    }

     return conn;
    }

}